Optimal. Leaf size=131 \[ -\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {7 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{4 \sqrt {2} d}+\frac {a}{4 d \sqrt {a+a \sec (c+d x)}}+\frac {a}{2 d (1-\sec (c+d x)) \sqrt {a+a \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.09, antiderivative size = 131, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3965, 105, 157,
162, 65, 213} \begin {gather*} \frac {a}{4 d \sqrt {a \sec (c+d x)+a}}+\frac {a}{2 d (1-\sec (c+d x)) \sqrt {a \sec (c+d x)+a}}-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a \sec (c+d x)+a}}{\sqrt {a}}\right )}{d}+\frac {7 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a \sec (c+d x)+a}}{\sqrt {2} \sqrt {a}}\right )}{4 \sqrt {2} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 105
Rule 157
Rule 162
Rule 213
Rule 3965
Rubi steps
\begin {align*} \int \cot ^3(c+d x) \sqrt {a+a \sec (c+d x)} \, dx &=\frac {a^4 \text {Subst}\left (\int \frac {1}{x (-a+a x)^2 (a+a x)^{3/2}} \, dx,x,\sec (c+d x)\right )}{d}\\ &=\frac {a}{2 d (1-\sec (c+d x)) \sqrt {a+a \sec (c+d x)}}-\frac {a \text {Subst}\left (\int \frac {2 a^2+\frac {3 a^2 x}{2}}{x (-a+a x) (a+a x)^{3/2}} \, dx,x,\sec (c+d x)\right )}{2 d}\\ &=\frac {a}{4 d \sqrt {a+a \sec (c+d x)}}+\frac {a}{2 d (1-\sec (c+d x)) \sqrt {a+a \sec (c+d x)}}+\frac {\text {Subst}\left (\int \frac {-2 a^4+\frac {a^4 x}{4}}{x (-a+a x) \sqrt {a+a x}} \, dx,x,\sec (c+d x)\right )}{2 a^2 d}\\ &=\frac {a}{4 d \sqrt {a+a \sec (c+d x)}}+\frac {a}{2 d (1-\sec (c+d x)) \sqrt {a+a \sec (c+d x)}}+\frac {a \text {Subst}\left (\int \frac {1}{x \sqrt {a+a x}} \, dx,x,\sec (c+d x)\right )}{d}-\frac {\left (7 a^2\right ) \text {Subst}\left (\int \frac {1}{(-a+a x) \sqrt {a+a x}} \, dx,x,\sec (c+d x)\right )}{8 d}\\ &=\frac {a}{4 d \sqrt {a+a \sec (c+d x)}}+\frac {a}{2 d (1-\sec (c+d x)) \sqrt {a+a \sec (c+d x)}}+\frac {2 \text {Subst}\left (\int \frac {1}{-1+\frac {x^2}{a}} \, dx,x,\sqrt {a+a \sec (c+d x)}\right )}{d}-\frac {(7 a) \text {Subst}\left (\int \frac {1}{-2 a+x^2} \, dx,x,\sqrt {a+a \sec (c+d x)}\right )}{4 d}\\ &=-\frac {2 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {7 \sqrt {a} \tanh ^{-1}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{4 \sqrt {2} d}+\frac {a}{4 d \sqrt {a+a \sec (c+d x)}}+\frac {a}{2 d (1-\sec (c+d x)) \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.30, size = 87, normalized size = 0.66 \begin {gather*} \frac {\cot ^2(c+d x) \left (-2-7 \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\frac {1}{2} (1+\sec (c+d x))\right ) (-1+\sec (c+d x))+8 \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};1+\sec (c+d x)\right ) (-1+\sec (c+d x))\right ) \sqrt {a (1+\sec (c+d x))}}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(266\) vs.
\(2(106)=212\).
time = 0.20, size = 267, normalized size = 2.04
method | result | size |
default | \(\frac {\sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}\, \left (8 \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}}{2}\right ) \left (\cos ^{2}\left (d x +c \right )\right ) \sqrt {2}+7 \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {1}{\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right ) \left (\cos ^{2}\left (d x +c \right )\right )-8 \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sqrt {2}}{2}\right ) \sqrt {2}-7 \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \arctan \left (\frac {1}{\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}\right )+6 \left (\cos ^{2}\left (d x +c \right )\right )-2 \cos \left (d x +c \right )\right ) \left (\cos ^{2}\left (d x +c \right )-1\right )}{8 d \sin \left (d x +c \right )^{4}}\) | \(267\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.27, size = 426, normalized size = 3.25 \begin {gather*} \left [\frac {8 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sqrt {a} \log \left (-8 \, a \cos \left (d x + c\right )^{2} + 4 \, {\left (2 \, \cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} - 8 \, a \cos \left (d x + c\right ) - a\right ) + 7 \, {\left (\sqrt {2} \cos \left (d x + c\right )^{2} - \sqrt {2}\right )} \sqrt {a} \log \left (\frac {2 \, \sqrt {2} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) + 3 \, a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right ) - 1}\right ) + 4 \, {\left (3 \, \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}}}{16 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}}, -\frac {7 \, {\left (\sqrt {2} \cos \left (d x + c\right )^{2} - \sqrt {2}\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {2} \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{a \cos \left (d x + c\right ) + a}\right ) - 8 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{2 \, a \cos \left (d x + c\right ) + a}\right ) - 2 \, {\left (3 \, \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right )\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}}}{8 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \cot ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.84, size = 140, normalized size = 1.07 \begin {gather*} \frac {\sqrt {2} {\left (\frac {8 \, \sqrt {2} a \arctan \left (\frac {\sqrt {2} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}{2 \, \sqrt {-a}}\right )}{\sqrt {-a}} - \frac {7 \, a \arctan \left (\frac {\sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} + 2 \, \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} - \frac {\sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2}}\right )} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )}{8 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\mathrm {cot}\left (c+d\,x\right )}^3\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________